<?php
    header('Content-Type:text/html;charset=utf-8');
//   if(isset($_POST['button'])){
        echo 222;
               $name=$_POST['name'];
               $phone=$_POST['phone'];
               $email=$_POST['email'];
               $message=$_POST['message'];

              mysql_connect('localhost','root','') or die(mysql_error());
              mysql_select_db('zhudata') or die('数据库选择失败');
              mysql_query('set names utf8');

              $sql = "insert into messagedata values(null,'$name','$phone','$email','$message',now())";

              // echo $sql;
           if(mysql_query($sql)){
                  // header('location:../admin.php');
                    echo 1;
                 }else {
                   echo '留言失败';
                 }

//          }
?>
